package com.ruoyi.cderp.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 物料库存对象 material_stock
 *
 * @author wzy
 * @date 2025-06-09
 */
public class MaterialStock extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private String id;

    /** 仓库ID */
    private String warehouseId;

    /** 仓库名称 */
    @Excel(name = "仓库名称")
    private String warehouseName;

    /** 物料ID */
    private String materialId;

    /** 物料编码 */
    @Excel(name = "物料编码")
    private String materialCode;

    /** 物料名称 */
    @Excel(name = "物料名称")
    private String materialName;

    /** 库存数量 */
    @Excel(name = "库存数量")
    private BigDecimal stockQuantity;

    /** 最后入库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后入库时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastInTime;

    //最早入库时间
    private Date lastInMinTime;
    //最晚入库时间
    private Date lastInMaxTime;


    /** 最后出库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后出库时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastOutTime;

    //最早出库时间
    private Date lastOutMinTime;
    //最晚出库时间
    private Date lastOutMaxTime;

    //物料
    private Material material;

    public Material getMaterial() {
        return material;
    }

    public void setMaterial(Material material) {
        this.material = material;
    }

    public Date getLastInMinTime() {
        return lastInMinTime;
    }

    public void setLastInMinTime(Date lastInMinTime) {
        this.lastInMinTime = lastInMinTime;
    }

    public Date getLastInMaxTime() {
        return lastInMaxTime;
    }

    public void setLastInMaxTime(Date lastInMaxTime) {
        this.lastInMaxTime = lastInMaxTime;
    }

    public Date getLastOutMinTime() {
        return lastOutMinTime;
    }

    public void setLastOutMinTime(Date lastOutMinTime) {
        this.lastOutMinTime = lastOutMinTime;
    }

    public Date getLastOutMaxTime() {
        return lastOutMaxTime;
    }

    public void setLastOutMaxTime(Date lastOutMaxTime) {
        this.lastOutMaxTime = lastOutMaxTime;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setWarehouseId(String warehouseId)
    {
        this.warehouseId = warehouseId;
    }

    public String getWarehouseId()
    {
        return warehouseId;
    }
    public void setWarehouseName(String warehouseName)
    {
        this.warehouseName = warehouseName;
    }

    public String getWarehouseName()
    {
        return warehouseName;
    }
    public void setMaterialId(String materialId)
    {
        this.materialId = materialId;
    }

    public String getMaterialId()
    {
        return materialId;
    }
    public void setMaterialCode(String materialCode)
    {
        this.materialCode = materialCode;
    }

    public String getMaterialCode()
    {
        return materialCode;
    }
    public void setMaterialName(String materialName)
    {
        this.materialName = materialName;
    }

    public String getMaterialName()
    {
        return materialName;
    }
    public void setStockQuantity(BigDecimal stockQuantity)
    {
        this.stockQuantity = stockQuantity;
    }

    public BigDecimal getStockQuantity()
    {
        return stockQuantity;
    }
    public void setLastInTime(Date lastInTime)
    {
        this.lastInTime = lastInTime;
    }

    public Date getLastInTime()
    {
        return lastInTime;
    }
    public void setLastOutTime(Date lastOutTime)
    {
        this.lastOutTime = lastOutTime;
    }

    public Date getLastOutTime()
    {
        return lastOutTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("warehouseId", getWarehouseId())
            .append("warehouseName", getWarehouseName())
            .append("materialId", getMaterialId())
            .append("materialCode", getMaterialCode())
            .append("materialName", getMaterialName())
            .append("stockQuantity", getStockQuantity())
            .append("lastInTime", getLastInTime())
            .append("lastOutTime", getLastOutTime())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
